<%@ page language="java" contentType="text/html; charset=ISO-8859-1" 
 pageEncoding="ISO-8859-1" 
 import="beans.InfractionBean"
 import="domainObjects.Infraction" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
 "http://www.w3.org/TR/html4/loose.dtd">
<%
	InfractionBean infractionBean = (InfractionBean)request.getSession().getAttribute("InfractionBean");
%>
<html>
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Visualiser Infractions</title>
</head>
<body>
<a href='<%= response.encodeURL("index.jsp") %>'><b>Main page</b></a><br>
<% if(infractionBean != null){%>
 <table>
 <tr>
 <th>ID</th>
 <th>Description</th>
 <th>Niveau Gravite</th>
 </tr>
<c:forEach var="d" items="<%=infractionBean.getInfractions()%>"> 
<tr>
<td>${d.id()}</td>
 <td>${d.description()}</td>
 <td>${d.niveau()}</td>
</tr>
</c:forEach> 
 </table>
<%}else{ %>
  Utiliser le Servlet<br /> 
<%}%>
</body>
</html>